<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddProfessionalToExpertsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $connection = config('evaluation.database.connection') ?: config('database.default');
        Schema::connection($connection)->table(config('evaluation.database.users_table'), function (Blueprint $table) {
            $table->string('professional')->nullable()->comment('职称');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        $connection = config('evaluation.database.connection') ?: config('database.default');
        Schema::connection($connection)->table(config('evaluation.database.users_table'), function (Blueprint $table) {
            $table->dropColumn(['professional']);
        });
    }
}
